feat(orchestrator): add mention-chain coordination for Gitea mentions#832
Merged
AlexMikhalev merged 6 commits intomainfrom Apr 22, 2026
Merged
feat(orchestrator): add mention-chain coordination for Gitea mentions#832AlexMikhalev merged 6 commits intomainfrom
AlexMikhalev merged 6 commits intomainfrom
Conversation
Step 1/6 of #144 - Inter-agent orchestration via Gitea mentions. - New mention_chain.rs: MentionChainTracker with check() and build_context() - MentionChainError: SelfMention, DepthExceeded, CycleDetected - MentionContextArgs for structured context building - DEFAULT_MAX_MENTION_DEPTH = 3 - DispatchTask::MentionDriven gains chain_id, depth, parent_agent fields - MentionConfig gains max_mention_depth (default: 3) - 14 unit tests all passing Refs #760
Step 3/6 of #144 - Inter-agent orchestration via Gitea mentions. - Add resolve_mention_chain() helper to determine chain_id/depth/parent - Add MentionChainTracker::check() gate before all mention spawns - Add MentionChainTracker::build_context() for structured handoff context - Apply chain tracking to all 3 dispatch sites: - Qualified mentions (@adf:project/agent) - Unqualified agent mentions (@adf:agent) - Persona mentions (@adf:persona) - Add mention_chain_id/mention_depth to ManagedAgent - Replace flat mention context with structured markdown block Refs #762
…able agents in context - Fix AgentRunRecord construction: extract chain fields from active_agents via .get() instead of referencing non-existent local variable - Add mention_parent_agent field to ManagedAgent, set at all 3 dispatch sites - Pass available_agents in MentionContextArgs so spawned agents know who they can chain to - Add 2 tests for available_agents in mention context output Refs #763 Refs #764 Refs #144
- Fix Unicode truncation panic: use char-boundary-safe slicing - Post rejection comments when mention chain check fails (3 polling sites) - Wire webhook dispatch through MentionChainTracker::check() and build_context() so depth limits apply uniformly - Store chain metadata on webhook-spawned agents - Add test for multibyte truncation boundary safety Refs #144
AlexMikhalev
added a commit
that referenced
this pull request
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
terraphim_orchestrator.docs/Scope
MentionChainTrackerwith depth guard, self-mention rejection, and structured context buildingMentionDrivenmetadata:chain_id,depth,parent_agentMentionConfig.max_mention_depthAgentRunRecordcaptures mention-chain metadataVerification Plan And Results
.docs/verification-inter-agent-orchestration.mdcargo test -p terraphim_orchestrator: PASS (516 passed; 0 failed)cargo clippy -p terraphim_orchestrator -- -D warnings: PASScargo clippy --workspace --all-targets -- -D warnings: PASSpanic!false positive was triaged and captured as a learningValidation Plan And Results
.docs/validation-inter-agent-orchestration.mdArtefacts
.docs/research-inter-agent-orchestration.md.docs/design-inter-agent-orchestration.md.docs/verification-inter-agent-orchestration.md.docs/validation-inter-agent-orchestration.mdIssues